<template>
	<view class="scan">
		<view class="scanrq"  @click="submit">
			<image  src="../../static/scan.webp" mode=""  ></image>
		</view>
	</view>
	
</template>

<script>
	
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			submit(){
			   let that = this
			   uni.scanCode({
			   	success: function (res) {
			   		   that.$toast("扫码成功")
			   	        console.log('条码类型：' + res.scanType);
			   	        console.log('条码内容：' + res.result);
						uni.navigateTo({
							url:'/pages/scan/authorization'
						})
						//暂时不调用接口  先完成功能
					// 	this.$api.readqrcode({
					// 	  id:"1448586061400965121"
					// 	}).then(value =>{
					
					// 	})
			   	    }
			   }) 
				
			 
			}
		}
	}
</script>

<style lang="scss">
.scan{
	width: 750rpx;
	height: 100%;
	.scanrq{
		margin: 100rpx auto;
		width: 200rpx;
		height: 200rpx;
		image{
			width: 200rpx;
			height: 200rpx;
		}
	}
}
</style>
